package 匹配模式

object MatchType {
  def main(args: Array[String]): Unit = {
    val a = 2
    val obj = if (a == 1) 1
    else if (a == 2) "2"
    val demo = a match {
      case a: Int => a
      case b => b

    }
  }

}
